//
//  ST_RecentCallModel.swift
//  btvideo
//
//  Created by mac on 2021/9/9.
//  Copyright © 2021 JarvanZhang. All rights reserved.
//

import Foundation
import HandyJSON

class ST_RecentCallModel: HandyJSON {
    
    /// ID
    var id: Int = 0
    
    /// 用户ID
    var memberID: Int = 0
    
    /// 匹配对应用户的ID
    var targetMemberID: Int = 0
    
    /// 资源类型 1-语音 2-视频
    var resourceType: Int = 0
    
    /// 接通状况 1未接通 2已结束
    var type: Int = 0
    
    /// 秒
    var duration: String = ""
    
    /// 创建时间
    var createTime: String = ""
    
    /// 在线状态 2不在线 1在线
    var online_state: Int = 1
    
    /// 匹配用户名字
    var targetMemberName: String = ""
    
    /// 目标用户的accid
    var targetAccid: String = ""
    
    /// 目标用户头像
    var targetAvatar: String = ""
    
    /// 已回拨 1是 0否
    var hasCallback: Int = 0
    
    /// 发起人是否是自己 true是。false不是
    var sponsorSelf: Bool = false
    
    required init() {}
    
    func mapping(mapper: HelpingMapper) {
        mapper <<<
            memberID <-- "member_id"
        mapper <<<
            targetMemberID <-- "target_member_id"
        mapper <<<
            resourceType <-- "resource_type"
        mapper <<<
            online_state <-- "online_state"
        mapper <<<
            targetMemberName <-- "target_member_name"
        mapper <<<
            targetAccid <-- "target_accid"
        mapper <<<
            targetAvatar <-- "target_avatar"
        mapper <<<
            createTime <-- "create_time"
        mapper <<<
            hasCallback <-- "has_callback"
        mapper <<<
            sponsorSelf <-- "sponsor_self"
    }
}
